package com.poh.mapper;

import com.poh.pojo.SU;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SUMapper {
    int addSU(SU su);
    List<SU> querySUByUserIdAndCourseId(@Param("userId") int userId, @Param("courseId") int courseId);
    SU querySUBySIdAndUserId(@Param("sId") String sId, @Param("userId") int userId);
    int updateSUStudentSingInStatus(@Param("sId") String sId, @Param("userId") int userId, @Param("singInTime") String singInTime, @Param("stuSingInStatus") int status);
    List<SU> querySingInStuBySid(@Param("sId") String sId);
    int getCountSingIn(@Param("sId") String sId, @Param("stuSingInStatus") int stuSingInStatus);
    int getCountMySingIn(@Param("userId") int userId, @Param("courseId") int courseId, @Param("singInStatus") int singInStatus);
}
